Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Accessing and Changing Control Settings and Data /


SetUpControlBackground

NEW WITH THE APPEARANCE MANAGER

Sets the background for a control.

pascal OSErr SetUpControlBackground (
                     ControlHandle inControl,
                     SInt16 inDepth,
                     Boolean inIsColorDevice);
inControl
On input, a handle to the control whose background you wish to set.
inDepth
The bit depth (in pixels) of the current graphics port.
inIsColorDevice
A Boolean value. Set to true to indicate that you are drawing on a color device; set to false for a monochrome device.
function result
A result code; see "Result Codes".
DISCUSSION
The SetUpControlBackground function allows you to set the background of a control. This function is typically called by control definition functions that are embedded in other controls. You might call SetUpControlBackground in response to an application-defined function installed in a user pane control; see "Defining Your Own User Pane Functions". SetUpControlBackground ensures that the background color is always correct when calling EraseRect and EraseRgn. If your control spans multiple monitors, SetUpControlBackground should be called for each device that your control is drawing on; see "Graphics Devices" in Imaging With QuickDraw for more details on handling device loops.

SEE ALSO
"Appearance Manager Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998